package com.quicks.beauty.admin.web;

import com.quicks.beauty.admin.common.CustomerDateEditor;
import org.springframework.web.bind.ServletRequestDataBinder;
import org.springframework.web.bind.annotation.InitBinder;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;

public class BaseController {

    protected int pageNum = 1;
    protected int pageSize = 10;

    @InitBinder
    protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception {
        // 对于需要转换为Date类型的属性，使用DateEditor进行处理
        binder.registerCustomEditor(Date.class, new CustomerDateEditor());
    }
}
